import React from 'react'
import { createRoot } from 'react-dom/client'

const list = [
  { id: 1, name: '杭州黑马', salary: 13000 },
  { id: 2, name: '上海黑马', salary: 12800 },
  { id: 3, name: '北京黑马', salary: 18800 },
]
const arr = list.map((item) => {
  return (
    <ul key={item.id}>
      <li>
        <h3>班级：{item.name}</h3>
        <p>工资：{item.salary}</p>
      </li>
    </ul>
  )
})
// console.log(arr)
const ele = <div>{arr}</div>

// ReactDOM.render(element, document.querySelector('#root'))
// createRoot(document.querySelector('#root')).render(render())
createRoot(document.querySelector('#root')).render(ele)
